<div class="row">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->
	
		<div class="row">
			<div class="col-xs-12">
				<div class="table-header">
					Hasil Pencarian Data Cabang
		            <div  align='right'>    
        		        <a align='right' href=<?= base_url() ?>index.php/cabang/tambahcabang class="btn btn-xs btn-primary green"  data-toggle="modal" >
                			<i class="icon-plus bigger-110">
                    			Tambah Cabang
                			</i>
            			</a>
	    			</div>
				</div>

				<div class="table-responsive">
					<table id="sample-table-2" class="table table-striped table-bordered table-hover" align="center">
						<thead>
							<tr style="text-align:center">
								<th width="25" style="text-align:center">No</th>
								<th width="25" style="text-align:center">Nama Customer</th>
								<th width="25" style="text-align:center">Keterangan</th>
							</tr>
						</thead>
   	
						<tbody>
							<?php $i = 1; foreach ($querycabang->result() as $row) { ?>
								<tr> 
									<td width="3"><?= $i++; ?></td>
									<td style="width:200px"><?= $row->nama_kota ?></td>
									<td style="width:200px"><?= $row->keterangan ?></td>
								</tr>
							<?php } ?>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div><!-- /.col -->
</div><!-- /.row -->
						
						
		<!-- basic scripts -->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='<?= base_url() ?>assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='<?= base_url() ?>assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<?= base_url() ?>assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>

		<!-- page specific plugin scripts -->

		<script src="<?= base_url() ?>assets/js/jquery.dataTables.min.js"></script>
		<script src="<?= base_url() ?>assets/js/jquery.dataTables.bootstrap.js"></script>

		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			jQuery(function($) {
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
				   null, null,
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			})
		</script>